package com.smedi.ismedi.personnel.core.port.adapter.persistence.mybatis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smedi.ismedi.personnel.core.application.query.vo.PersonInfoVo;
import com.smedi.ismedi.personnel.core.port.adapter.persistence.model.PersonEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: xulinjun
 * @Date: 2021-6-8 10:52
 */
public interface PersonMapper extends BaseMapper<PersonEntity> {
    List<Long> selectPersonIdByLastNameAndUserNameAndEmployeeNumAndMobile(@Param("lastName") String lastName,
                                                                          @Param("userName") String userName,
                                                                          @Param("employeeNum") String employeeNum,
                                                                          @Param("mobile") String mobile);

    IPage<PersonInfoVo> selectPersonManagementPagination(Page<PersonInfoVo> page,
                                                         @Param("lastName") String lastName,
                                                         @Param("userName") String userName,
                                                         @Param("employeeNum") String employeeNum,
                                                         @Param("personType") String personType,
                                                         @Param("status") String status,
                                                         @Param("internal") Boolean internal,
                                                         @Param("nonPersonIds") List<Long> nonPersonIds);
}
